package com.yomahub.liteflow.example.xstream.converter;

import com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter;
import com.yomahub.liteflow.example.xstream.Person;

/**
 * @program: liteflow-example
 * @description:
 * @author: yyyyjinying
 * @create: 2023-09-25 23:32
 **/
public class PersonSingleValueConverter extends AbstractSingleValueConverter {
    @Override
    public boolean canConvert(Class type) {
        return type.equals(Person.class);
    }

    @Override
    public Object fromString(String str) {
        Person person = new Person();
        person.setName(str);
        return person;
    }
}
